package com.example.jpa.crud.configuration;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix = "crud")
public class CrudConfiguration {

    private String pathPrefix;

    private Boolean removePathPrefix;

    private Boolean showSql;

    public boolean printSql() {
        return Boolean.TRUE.equals(showSql);
    }

    public String getPathPrefix() {
        return pathPrefix;
    }

    public void setPathPrefix(String pathPrefix) {
        this.pathPrefix = pathPrefix;
    }

    public Boolean getRemovePathPrefix() {
        return removePathPrefix;
    }

    public void setRemovePathPrefix(Boolean removePathPrefix) {
        this.removePathPrefix = removePathPrefix;
    }

    public Boolean getShowSql() {
        return showSql;
    }

    public void setShowSql(Boolean showSql) {
        this.showSql = showSql;
    }

}